package fin_enum

import "gitee.com/lailonghui/vehicle-supervision-framework/pkg/dicts"

// 司机卡类型
type driverCardType int

var DriverCardType driverCardType

// 首航
func (c *driverCardType) ShouHang() int {
	return 1
}

// 华宝
func (c *driverCardType) HuaBao() int {
	return 2
}

// 龙翰
func (c *driverCardType) LongHan() int {
	return 3
}

// 海康
func (c *driverCardType) HaiKang() int {
	return 4
}

func (c *driverCardType) ToText(value int) string {
	switch value {

	case 1:
		return "首航"

	case 2:
		return "华宝"

	case 3:
		return "龙翰"

	case 4:
		return "海康"

	}
	return ""
}

func (c *driverCardType) ToDict(value int) *dicts.IntDict {
	return &dicts.IntDict{
		Text:  c.ToText(value),
		Value: value,
	}
}

func (c *driverCardType) ToValue(text string) int {
	switch text {

	case "首航":
		return 1

	case "华宝":
		return 2

	case "龙翰":
		return 3

	case "海康":
		return 4

	}
	return 0
}
